<div class="modal-header">
  <div class="modal-title">重置密码</div>
</div>
<div nz-row [nzGutter]="16">
  <nz-spin [nzTip]="'数据加载中...'" [nzSpinning]="loading">
<div nz-col [nzMd]="24">
  <nz-card>
      <form nz-form [formGroup]="form">
        <div nz-form-item nz-row>
          <div nz-form-label nz-col [nzSm]="6">
            <label for="content" nz-form-item-required>
              <span>
                  用户名 
              </span>
            </label>
          </div>
          <div nz-form-control nz-col [nzSm]="18" nzHasFeedback > 
            {{userName}}
          </div>
        </div>
        <div nz-form-item nz-row>
          <div nz-form-label nz-col [nzSm]="6">
            <label for="content" nz-form-item-required>
              <span>
                  姓名 
              </span>
            </label>
          </div>
          <div nz-form-control nz-col [nzSm]="18" nzHasFeedback >
            {{name}}
          </div>
        </div>
        <div nz-form-item nz-row>
          <div nz-form-label nz-col [nzSm]="6">
            <label for="content" nz-form-item-required>
              <span>
                  新密码 
              </span>
            </label>
          </div>
          <div nz-form-control nz-col [nzSm]="18" nzHasFeedback > 
            <nz-input formControlName="newPassword"  [nzId]="'newPassword'" [nzType]="'password'" (ngModelChange)="updateConfirmValidator()"></nz-input>
            <div nz-form-explain *ngIf="getFormControl('newPassword').dirty&&getFormControl('newPassword').hasError('required')">请输入密码!</div>
          </div>
        </div>
        <div nz-form-item nz-row>
          <div nz-form-label nz-col [nzSm]="6">
            <label for="content" nz-form-item-required>
              <span>
                  确认密码 
              </span>
            </label>
          </div>
          <div nz-form-control nz-col [nzSm]="18" nzHasFeedback > 
            <nz-input formControlName="checkPassword"  [nzId]="'checkPassword'" [nzType]="'password'"></nz-input>
            <div nz-form-explain *ngIf="getFormControl('checkPassword').dirty&&getFormControl('checkPassword').hasError('required')">请确认密码!</div>
          <div nz-form-explain *ngIf="getFormControl('checkPassword').dirty&&getFormControl('checkPassword').hasError('confirm')">两次密码不一致!</div> 
          </div>
        </div>
      </form>
  </nz-card>
</div>
</nz-spin>
</div>
<div class="modal-footer">
  <button nz-button [nzType]="'default'" [nzSize]="'large'" (click)="cancelFn()">
      关闭
  </button>
  <button nz-button [nzType]="'primary'" [nzSize]="'large'" (click)="ok()">
      提交
  </button>
</div>
